package com.ymatou.iapi.userservice.service;

import java.util.ArrayList;

import org.json.JSONObject;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.ymatou.iapi.userservice.parameter.resp.MailexistsResp;
import com.ymatou.iapi.userservice.parameter.resp.SingleuserbriefResp;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.database.model.Userinfo;
import com.ymttest.database.model.Userinfoex;
import com.ymttest.utils.EnvSetup;

/**
 * 根据userid批量查询用户信息明细Call FreeMaker Template自动生成代码
 */
public class SingleUserbriefCall extends YmatouBaseCall {
	private static String opurl = "api/user/query/singleuserbrief";

	public SingleUserbriefCall() {
		super(EnvSetup.getSystemUrl("userservice_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}

	/**
	 * 获取返回结果
	 * @return
	 */
	public SingleuserbriefResp getResultData(){	
		SingleuserbriefResp values = null;
		try {
			values = (SingleuserbriefResp)FormatUtil.GSONToObject(new JSONObject(getReturnData()).toString(), SingleuserbriefResp.class);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return values;
	}
}